package com.ali.Reggie.config;

/**
 * @author ：ALi
 * @date ：Created in 2022/6/7 16:32
 * @description：mybatisPlus配置类
 * @modified By：
 * @version: $
 */

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * create by: ALi
 * description: 配置MybatisPlus配置类
 * create time: 2022/6/7 16:33
 *
  * @Param: null
 * @return
 */
@Configuration
public class MybatisPlusConfig {

    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor(){
        MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
        mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor());
        return mybatisPlusInterceptor;
    }
}